package com.batch.adance.cvs;

import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.FieldSet;
import org.springframework.validation.BindException;

public class AppInfoDtoFileMapper implements FieldSetMapper<AppInfo> {

	@Override
	public AppInfo mapFieldSet(FieldSet fieldSet) throws BindException {
		return new AppInfo(Integer.valueOf(fieldSet.readInt("序号")), fieldSet.readString("appid"),
				fieldSet.readString("app_name"), fieldSet.readString("app_icon"), fieldSet.readString("app_secret"),
				Long.valueOf(fieldSet.readLong("created_time")), fieldSet.readString("description"));
	}

}